package org.dromara.xhlj.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.dromara.starter.jpacomment.annotation.SailColumn;
import org.dromara.starter.jpacomment.annotation.SailIndex;
import org.dromara.starter.jpacomment.annotation.SailTable;
import org.dromara.starter.jpacomment.enums.IndexType;
/**
 * 商品对象 xhlj_goods
 *
 * @author yf
 * @date 2024-07-28
 */

@Data
@TableName("xhlj_goods")
@Entity
@Table(name = "xhlj_goods")
@SailTable(comment = "商品表", indexs = {
    @SailIndex(name = "idx_product_name", type = IndexType.BTREE,
       columns = {"good_name"}
    ),    @SailIndex(name = "idx_shop_id", type = IndexType.BTREE,
       columns = {"create_by"}
    )}
)
public class XhljGoods implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String TRANS_ID_TO_VO = "xhlj_goods_vo";
    public static final String TRANS_ID_TO_VO_LIST = "xhlj_goods_list";
    /**
     * 商品ID
     */
    @TableId(value = "good_id", type = IdType.AUTO)
    @Id
    private Integer goodId;
    /**
     * 商品名称
     */
    @Column(name = "good_name")
    @SailColumn(comment = "商品名称",type = "varchar(100)", defaultValue = "NULL")
    private String goodName;
    /**
     * 大会id
     */
    @SailColumn(comment = "大会id",type = "int", defaultValue = "NULL")
    @Column(name = "conference_info_id")
    private Integer conferenceInfoId;
    /**
     * 详细描述
     */
    @Column(name = "detailed_description")
    @SailColumn(comment = "详细描述",type = "text", defaultValue = "NULL")
    private String detailedDescription;
    /**
     * 创建人sys_user（大会管理员/活动负责人）
     */
    @SailColumn(comment = "创建人sys_user（大会管理员/活动负责人）",type = "int", defaultValue = "NULL")
    @Column(name = "create_by")
    private Integer createBy;
    /**
     * 销售类型（0=积分，1=价格）
     */
    @Column(name = "shelf_type")
    @SailColumn(comment = "销售类型（0=积分，1=价格）",type = "char(3)", defaultValue = "0")
    private String shelfType;
    /**
     * 销售价/积分
     */
    @Column(name = "sale_price_points")
    @SailColumn(comment = "销售价/积分",type = "decimal(10,2)", defaultValue = "NULL")
    private BigDecimal salePricePoints;
    /**
     * 图片
     */
    @Column(name = "product_image")
    @SailColumn(comment = "图片",type = "text", defaultValue = "NULL")
    private String productImage;
    /**
     * 上架状态（0=未上架，1=已上架）
     */
    @Column(name = "shelf_status")
    @SailColumn(comment = "上架状态（0=未上架，1=已上架）",type = "char(3)", defaultValue = "0")
    private String shelfStatus;
    /**
     * 上架时间
     */
    @Column(name = "shelf_time")
    @SailColumn(comment = "上架时间",type = "datetime", defaultValue = "NULL")
    private Date shelfTime;
    /**
     * 下架时间
     */
    @Column(name = "unshelf_time")
    @SailColumn(comment = "下架时间",type = "datetime", defaultValue = "NULL")
    private Date unshelfTime;
    /**
     * 销量
     */
    @Column(name = "sales_volume")
    @SailColumn(comment = "销量",type = "int", defaultValue = "NULL")
    private Integer salesVolume;
    /**
     * 库存量
     */
    @Column(name = "inventory_volume")
    @SailColumn(comment = "库存量",type = "int", defaultValue = "NULL")
    private Integer inventoryVolume;
    /**
     * 商品标签（0=纪念品，1=书籍）
     */
    @Column(name = "product_tags")
    @SailColumn(comment = "商品标签（0=纪念品，1=书籍）",type = "char(3)", defaultValue = "NULL")
    private String productTags;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    @SailColumn(comment = "创建时间",type = "datetime", defaultValue = "CURRENT_TIMESTAMP")
    private Date createTime;
    /**
     * 删除标志（0=未删除，2=已删除）
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "del_flag")
    @SailColumn(comment = "删除标志（0=未删除，2=已删除）",type = "char(1)", defaultValue = "0")
    private String delFlag;
}
